<?php

namespace app\admin\validate;

use app\common\enums\StatusEnum;
use think\Validate;

class Message extends Validate
{
    protected $rule = [
        'title|标题' => 'require|length:1,255|unique:message',
        'sort_num|权重' => 'require|number',
        'content|内容' => 'require',
        'status|状态' => 'in:' . StatusEnum::DISABLED . ',' . StatusEnum::ENABLED,
    ];
}